import request from '@/utils/request'

// 查询服务单列列表
export function receiveListListList(query) {
  return request({
    url: '/business/serviceList/receiveList',
    method: 'get',
    params: query
  })
}
// 查询服务单列列表
export function sendListListList(query) {
  return request({
    url: '/business/serviceList/sendList',
    method: 'get',
    params: query
  })
}
// 查询服务单列详细
export function getList(id) {
  return request({
    url: '/business/serviceList/' + id,
    method: 'get'
  })
}

// 新增服务单列
export function addList(data) {
  return request({
    url: '/business/serviceList',
    method: 'post',
    data: data
  })
}

// 修改服务单列
export function updateList(data) {
  return request({
    url: '/business/serviceList',
    method: 'put',
    data: data
  })
}

// 删除服务单列
export function delList(id) {
  return request({
    url: '/business/serviceList/' + id,
    method: 'delete'
  })
}

// 查询服务单列详细
export function getDetail(query) {
  return request({
    url: '/system/list/getTree',
    method: 'get',
    params: query
  })
}
// 服务单-接收
export function exchangeState(id) {
  return request({
    url: '/business/serviceList/handle/' + id,
    method: 'get',
  })
}
// 服务单-完成
export function completeServiceList(id) {
  return request({
    url: '/business/serviceList/completeServiceList/' + id,
    method: 'get',
  })
}

// 服务单-回复
export function systemdetails(data) {
  return request({
    url: '/business/serviceListDetails',
    method: 'post',
    data
  })
}

// 服务单统计-整体统计

export function getTotalStatistics(query) {
  return request({
    url: '/business/serviceOrderStatistics/getTotalStatistics',
    method: 'get',
    params: query
  })
}
// 服务单类型统计
export function getTypeStatistics(query) {
  return request({
    url: '/business/serviceOrderStatistics/getTypeStatistics',
    method: 'get',
    params: query
  })
}
// 服务单--员工服务统计排序
export function getUserStatistics(query) {
  return request({
    url: '/business/serviceOrderStatistics/getUserStatistics',
    method: 'get',
    params: query
  })
}
// 服务单统计排序
export function getSortStatistics(query) {
  return request({
    url: '/business/serviceOrderStatistics/getSortStatistics',
    method: 'get',
    params: query
  })
}
// 获取雇主&客户对应的服务单列表
export function getEmployerServiceOrder(query) {
  return request({
    url: '/business/service/order/getEmployerServiceOrder',
    method: 'get',
    params: query
  })
}
